import { instance } from '@/utils/request';

const addChart = (data: { gid: number }) => instance.post('/Charts/Add', data);

const deleteChart = (id: number) => instance.post('/Charts/Delete', { id });

const increaseChart = (id: number) => instance.post('/Charts/Increase', { id });

const decreaseChart = (id: number) => instance.post('/Charts/Decrease', { id });

const setChartGoodCount = (id: number, count: number) =>
  instance.post('/Charts/SetChartGoodCount', { id, count });

const getChartList = () => instance.get('/Charts/GetCartList');

export default {
  addChart,
  deleteChart,
  increaseChart,
  decreaseChart,
  setChartGoodCount,
  getChartList,
}; // 导出 default
